//该文件专门用于创建整个应用的路由器
import VueRouter from 'vue-router'

import About from '../pages/About.vue'
import Home from '../pages/Home.vue'
import news from '../pages/news.vue'
import Message from '../pages/Message.vue'
import Deatail from '../pages/Deatail.vue'
//创建并暴露一个路由器
export default new VueRouter({
    routes:[
        {
            path:'/about',
            component:About
        },
        {
            path:'/home',
            component:Home,
            children:[
                {
                    path:'news',
                    component:news,
                },
                {
                    path:'message',
                    component:Message,
                    children:[
                        {
                        name:'xiangqing',
                        path:'deatail/:id/:title',
                        component:Deatail,
                        }
                    ]
                }
            ]
        },
        
    ]
})
